<?php if (!defined('THINK_PATH')) exit();?><form id="pagerForm" action="/Admin/User/index" method="post">
    <input type="hidden" name="pageNum" value="<?php echo ($page['pageNum']); ?>"/>
<input type="hidden" name="numPerPage" value="<?php echo ($page['numPerPage']); ?>" />
    <input type="hidden" name="auth" value="<?php echo ($paramter['auth']); ?>"/>
    <input type="hidden" name="username" value="<?php echo ($paramter['username']); ?>"/>
    <input type="hidden" name="nickname" value="<?php echo ($paramter['nickname']); ?>"/>
</form>

<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="/Admin/User/index" method="post">
        <div class="searchBar">
            <ul class="searchContent">
	            <li>
	                <label>群组：</label>
	                <select name="auth">
	                    <option value="0">请选择</option>
                        <?php if(is_array($roleList)): $i = 0; $__LIST__ = $roleList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$volist): $mod = ($i % 2 );++$i; if($volist['id'] == $paramter['auth']): ?><option value="<?php echo ($volist['id']); ?>" selected="selected"><?php echo ($volist['title']); ?></option>
						<?php else: ?>
							<option value="<?php echo ($volist['id']); ?>"><?php echo ($volist['title']); ?></option><?php endif; endforeach; endif; else: echo "" ;endif; ?>
	                </select>
	            </li>
	            <li>
	                <label>账号名：</label>
					<input type="text" name="username" value="<?php echo ($paramter['username']); ?>" class="width_100" />
				</li>
	            <li>
	                <label>职权描述：</label>
					<input type="text" name="nickname" value="<?php echo ($paramter['nickname']); ?>" class="width_100" />
				</li>
	        </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <i class="iconfont">&#xe633;</i>
                                <button type="submit">搜索</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>

<div class="pageContent">
    <div class="panelBar" style="background:none;">
        <ul class="toolBar">
            <li>
                <a href="/Admin/User/add" class="add" rel="add" target="dialog" title="添加管理员">
                    <i class="iconfont">&#xe601;</i>
                    <span>添加</span>
                </a>
            </li>
            <li>
                <a href="/Admin/User/edit/id/{sid_user}" class="edit" rel="edit" target="dialog" title="编辑管理员">
                    <i class="iconfont">&#xe607;</i>
                    <span>编辑</span>
                </a>
            </li>
            <li>
                <a href="/Admin/User/pass_edit/id/{sid_user}" class="password" rel="edit" target="dialog" title="修改密码">
                    <i class="iconfont">&#xe605;</i>
                    <span>改密</span>
                </a>
            </li>
            <li>
                <a class="delete" href="/Admin/User/remove" target="selectedTodo" rel="id" posttype="string" title="你确定要批量删除吗？">
                    <i class="iconfont">&#xe612;</i>
                    <span>删除</span>
                </a>
            </li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="206">
        <thead>
            <tr>
				<th width="3%" class="txtMid">
					<input type="checkbox" group="id" class="checkboxCtrl">
				</th>
				<th width="5%">编号</th>
				<th width="10%">账号名</th>
				<th width="20%">职权描述</th>
				<th width="10%">所属群组</th>
				<!--<th width="10%">店铺logo</th>-->
				<th width="10%">创建时间</th>
				<th width="10%">最后登录时间</th>
				<th width="10%">最后登录IP</th>
				<th width="5%">状态</th>
				<th width="7%">操作</th>
			</tr>
        </thead>
        <tbody>
        <?php if($dataList|count > 0): if(is_array($dataList)): $i = 0; $__LIST__ = $dataList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$volist): $mod = ($i % 2 );++$i;?><tr target="sid_user" rel="<?php echo ($volist['id']); ?>" >
                <td class="txtMid">
                	<input name="id" value="<?php echo ($volist['id']); ?>" type="checkbox">
				</td>
                <td><?php echo ( $page['pageNum'] - 1 ) * $page['numperpage'] + ( $key + 1 );?></td>
                <td><?php echo ($volist['username']); ?></td>
                <td><?php echo ($volist['nickname']); ?></td>
                <td><?php echo ($volist['auth_title']); ?></td>
                <!--<td>
                    <?php if($volist['picture'] != ''): ?><a href="<?php echo ($volist['picture']); ?>" target="_blank" rel="example_group">
	                    <img src="<?php echo ($volist['picture']); ?>" height="20" />
                       </a>
                    <?php else: ?>
                       无<?php endif; ?>
                </td>-->
                <td><?php echo (date('Y-m-d H:i:s',$volist['create_time'])); ?></td>
                <td>
                <?php if($volist['last_login_time'] == 0): ?>暂无
				<?php else: ?>
                	<?php echo (date('Y-m-d H:i:s',$volist['last_login_time'])); endif; ?>
				</td>
                <td><?php echo ($volist['last_login_ip']?long2ip($volist['last_login_ip']):'暂无'); ?></td>
                <td>
	                <?php if($volist["status"] == 0): ?><img src="/Public/Admin/Images/ok.png" />
	                <?php else: ?>
	                	<img src="/Public/Admin/Images/error.png" /><?php endif; ?>
                </td>
                <td>
                    <?php if($volist['status'] == 1): ?><a href="/Admin/User/commSetStatus/id/<?php echo ($volist['id']); ?>/param/status-0" target="ajaxTodo" class="color_red">[恢复]</a>
                    <?php else: ?>
						<a href="/Admin/User/commSetStatus/id/<?php echo ($volist['id']); ?>/param/status-1" target="ajaxTodo" class="alink1">[禁用]</a><?php endif; ?>
                </td>
            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        <?php else: ?>
            <tr><td colspan="10" style="text-align:center;">没有数据!!!</td></tr><?php endif; ?>
        </tbody>
    </table>
    <div class="panelBar" style="background:none;">
    <div class="pages">
        <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <?php if(is_array($page['numPerPageArray'])): foreach($page['numPerPageArray'] as $key=>$vo): ?><option value="<?php echo ($vo); ?>"<?php if($vo == $page['numPerPage']): ?>selected='selected'<?php endif; ?>><?php echo ($vo); ?></option><?php endforeach; endif; ?>
        </select>
        <span>条，共<?php echo ($page['all']); ?>条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="<?php echo ($page['all']); ?>" numPerPage="<?php echo ($page['numPerPage']); ?>" pageNumShown="10" currentPage="<?php echo ($page['pageNum']); ?>"></div>
</div>
</div>